<template>
  <div>
    <!-- 搜索框 -->
    <search></search>
    <!-- 搜索框 -->

    <!-- 轮播图 -->
    <swiper :result="result"></swiper>
    <!-- 轮播图 -->

    <!-- 分类 -->
    <category :result="result"></category>
    <!-- 分类 -->

    <!-- 广告 -->
    <ad :result="result"></ad>
    <!-- 广告 -->

    <!-- 推荐 -->
    <recommond :result="result"></recommond>
    <!-- 推荐 -->

    <tab-bar></tab-bar>
  </div>
</template>

<script>
import search from "./components/search";
import swiper from "./components/swiper";
import category from "./components/category";
import ad from "./components/ad";
import recommond from "./components/recommond";
export default {
  components: {
    search,
    swiper,
    category,
    ad,
    recommond
  },
  data() {
    return {
      result: {}, //页面数据
    };
  },
  async created() {
    let result = await this.$utils.$http.request({
      url: "goods/getIndexInfo",
    });
    this.result = result.data.data;
    console.log(this.result);
  },
};
</script>

<style></style>
